/*
 * @Date         : 2024-05-20 11:18:07 星期1
 * @Author       : xut
 * @Description  :
 */
import { Router } from "express"
import { zodSchemaValidate as validate } from "../middleware/zodSchemaValidate.middleware"
import * as auth from "../controller/auth.controller"
import {
  registerUserSchema,
  loginUserSchema,
  refreshTokenSchema,
  verifyEmailSchema,
} from "../schema/auth.schema"

export const router = Router()

router.post("/register", validate(registerUserSchema), auth.register)
router.post("/login", validate(loginUserSchema), auth.login)
router.post("/refresh", validate(refreshTokenSchema), auth.refreshToken)
router.get("/verify", validate(verifyEmailSchema), auth.verifyEmail)
